{layout name='./base/base_back'}
		<script src="/front/js/jquery.js"></script>
		<link rel="stylesheet" type="text/css" href="/front/css/message.css"/>
		<style type="text/css">
			.msgLi{
				display: inline-block;
				width: 10px;
				height: 10px;
				background-color: red;
				border-radius: 50%;
				margin-right: 10px;
			}
		</style>
		<!--联系人开始-->
		<div id="message-info-box">
			<div id="message-info">
				{include file="./navleft"}
				<div class="message-info-right">
					<div class="message-info-tit">所有消息<span> (共 <i>{$msgAll}</i> 条，未读消息 <i>{$msgNotRead}</i> 条)</span></div>
					<div class="message-info-cont">
						<table width="100%" rules="rows">
							<tr>
								<th>内容</th>
								<th>发送时间</th>
								<th>操作</th>
							</tr>
							<tr></tr>
							{foreach $list as $v}
							<tr align="center">
								<td class="msgBody" style="cursor: default;">
									{if $v.reading===0}
									<div class="msgLi"></div>
									{/if}
									{$v.messages.content}
									<input type="hidden" value="{$v.id}" />
								</td>
								<td>{$v.messages.send_time}</td>
								<td><a href="/message/del?id={$v.id}" class="msg-del">删除</a></td>
							</tr>
							{/foreach}
						</table>
						{$list->render()}
					</div>
				</div>
			</div>
		</div>

		<!--联系人结束-->
		<script type="text/javascript">
			$('.msgBody a').css("padding","0px 10px");
			$('.msgBody').click(function(){
				$.ajax({
					type:"post",
					url:"/message/setstatus",
					data:{id:$(this).children('input').val()},
					dataType:'json',
					success:function(data){
						if(data===true){
							location.reload();
						}
					}
				});
			})
			$('.msgBody a').click(function(){
				var href = $(this).attr('href');
				$.ajax({
					type:"post",
					url:"/message/setstatus",
					data:{id:$(this).siblings('input').val()},
					dataType:'json',
					success:function(data){
						if(data===true){
							location.href= href;
						}
					}
				});
				return false;
			})
			
		</script>
	</body>
</html>
